home *** CD-ROM | disk | FTP | other *** search
/ Aminet 8 / Aminet 8 (1995)(GTI - Schatztruhe)[!][Oct 1995].iso / Aminet / dev / gcc / gcc270_src.lha / gcc-2.7.0-amiga / config / i386 / aix386ng.h < prev    next >
C/C++ Source or Header  |  1995-06-15  |  4KB  |  144 lines

  1. /* Definitions for IBM PS2 running AIX/386.
  2.    From: Minh Tran-Le <TRANLE@intellicorp.com>
  3.    Copyright (C) 1988 Free Software Foundation, Inc.
  4.  
  5. This file is part of GNU CC.
  6.  
  7. GNU CC is free software; you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation; either version 2, or (at your option)
  10. any later version.
  11.  
  12. GNU CC is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. GNU General Public License for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with GNU CC; see the file COPYING.  If not, write to
  19. the Free Software Foundation, 59 Temple Place - Suite 330,
  20. Boston, MA 02111-1307, USA.  */
  21.  
  22.  
  23. #include "i386/i386.h"
  24.  
  25. /* Get the generic definitions for system V.3.  */
  26.  
  27. #include "svr3.h"
  28.  
  29. /* Use the ATT assembler syntax.
  30.    This overrides at least one macro (ASM_OUTPUT_LABELREF) from svr3.h.  */
  31.  
  32. #include "i386/att.h"
  33.  
  34. /* Use crt1.o as a startup file and crtn.o as a closing file.  */
  35.  
  36. #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}"
  37. #define ENDFILE_SPEC   "crtn.o%s"
  38.  
  39. #define LIB_SPEC "%{shlib:-lc_s} -lc"
  40.  
  41. /* Special flags for the linker.  I don't know what they do.  */
  42.  
  43. #define LINK_SPEC "%{K} %{!K:-K} %{T*} %{z:-lm}"
  44.  
  45. /* Specify predefined symbols in preprocessor.  */
  46.  
  47. #define CPP_PREDEFINES "-Dps2 -Dunix -Di386 -Asystem(unix) -Asystem(aix) -Acpu(i386) -Amachine(i386)"
  48.  
  49. #define CPP_SPEC \
  50.   "%{posix:-D_POSIX_SOURCE}%{!posix:-DAIX} -D_I386 -D_AIX -D_MBCS"
  51.  
  52. /* special flags for the aix assembler to generate the short form for all
  53.    qualifying forward reference */
  54. /* The buggy /bin/as of aix ps/2 1.2.x cannot always handle it.    */
  55. #if 0
  56. #define ASM_SPEC "-s2"
  57. #endif /* 0 */
  58.  
  59. #undef ASM_FILE_START
  60. #define ASM_FILE_START(FILE)                     \
  61.   do { fprintf (FILE, "\t.file\t");                \
  62.        output_quoted_string (FILE, dump_base_name);        \
  63.        fprintf (FILE, "\n");                    \
  64.        if (optimize)                        \
  65.           ASM_FILE_START_1 (FILE);                 \
  66.        else                            \
  67.           fprintf (FILE, "\t.noopt\n");                \
  68.      } while (0)
  69.  
  70. /* This was suggested, but it shouldn't be right for DBX output. -- RMS
  71.    #define ASM_OUTPUT_SOURCE_FILENAME(FILE, NAME) */
  72.  
  73. /* Writing `int' for a bitfield forces int alignment for the structure.  */
  74.  
  75. #define PCC_BITFIELD_TYPE_MATTERS 1
  76.  
  77. #ifndef USE_GAS
  78. /* Don't write a `.optim' pseudo; this assembler
  79.    is said to have a bug when .optim is used.  */
  80.  
  81. #undef ASM_FILE_START_1
  82. #define ASM_FILE_START_1(FILE) fprintf (FILE, "\t.noopt\n")
  83. #endif
  84.  
  85. /* Output assembler code to FILE to increment profiler label # LABELNO
  86.    for profiling a function entry.  */
  87.  
  88. #undef FUNCTION_PROFILER
  89. #define FUNCTION_PROFILER(FILE, LABELNO)  \
  90.    fprintf (FILE, "\tleal %sP%d,%%eax\n\tcall mcount\n", LPREFIX, (LABELNO));
  91.  
  92. /* Note that using bss_section here caused errors
  93.    in building shared libraries on system V.3.
  94.    but AIX 1.2 does not have yet shareable libraries on PS2 */
  95. #undef ASM_OUTPUT_LOCAL
  96. #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED)  \
  97.   (bss_section (),                    \
  98.    ASM_OUTPUT_LABEL ((FILE), (NAME)),            \
  99.    fprintf ((FILE), "\t.set .,.+%u\n", (ROUNDED)))
  100.  
  101.  
  102. /* Undef all the .init and .fini section stuff if we are not using gas and
  103.  * gnu ld so that we can use collect because the standard /bin/as and /bin/ld
  104.  * cannot handle those.
  105.  */
  106. #ifndef USE_GAS
  107. # undef INIT_SECTION_ASM_OP
  108. # undef FINI_SECTION_ASM_OP
  109. # undef CTORS_SECTION_ASM_OP
  110. # undef DTORS_SECTION_ASM_OP
  111. # undef ASM_OUTPUT_CONSTRUCTOR
  112. # undef ASM_OUTPUT_DESTRUCTOR
  113. # undef DO_GLOBAL_CTORS_BODY
  114.  
  115. # undef CTOR_LIST_BEGIN
  116. # define CTOR_LIST_BEGIN
  117. # undef CTOR_LIST_END
  118. # define CTOR_LIST_END
  119. # undef DTOR_LIST_BEGIN
  120. # define DTOR_LIST_BEGIN
  121. # undef DTOR_LIST_END
  122. # define DTOR_LIST_END
  123.  
  124. # undef CONST_SECTION_FUNCTION
  125. # define CONST_SECTION_FUNCTION                        \
  126. void                                    \
  127. const_section ()                            \
  128. {                                    \
  129.   extern void text_section();                        \
  130.   text_section();                            \
  131. }
  132.  
  133. # undef EXTRA_SECTION_FUNCTIONS
  134. # define EXTRA_SECTION_FUNCTIONS                \
  135.   CONST_SECTION_FUNCTION                    \
  136.   BSS_SECTION_FUNCTION
  137.  
  138. /* for collect2 */
  139. # define OBJECT_FORMAT_COFF
  140. # define MY_ISCOFF(magic) \
  141.   ((magic) == I386MAGIC || (magic) == I386SVMAGIC)
  142.  
  143. #endif /* !USE_GAS */
  144.